/**
 * The main application class. An instance of this class is created by app.js when it
 * calls Ext.application(). This is the ideal place to handle application launch and
 * initialization details.
 */
Ext.define('App.Application', {
    extend: 'Ext.app.Application',
    
    namespace: 'App',
    
	requires: [
        'App.Main'
    ],
    quickTips: true,
    platformConfig: {
        desktop: {
            quickTips: true
        }
    },
	paths : {
		'App': 'extjs',
		'plugin' : 'extjs/plugin',
		'Util' : 'extjs/util',
		'resources' : 'resources'
	},
	mainView: 'App.Main',
    stores: [
             
    ],
    launch: function () {
    },
	getWebContext: function(){
        if(App.webContext){
            return App.webContext;
        }else{
            if(typeof appCtxPath != "undefined"){
                App.webContext = appCtxPath;
                return appCtxPath;
            }
            var webContext = location.pathname;
            App.webContext = webContext.substring(0,webContext.indexOf('/', 1)+1);
            return App.webContext;
        }
    },
	init: function(app){
		//Ext.ariaWarn = Ext.emptyFn;
		App.webContext = app.getWebContext();
		App.getWebContext = app.getWebContext;
		App.MainViewport = this.getMainView();
	}
//    ,onAppUpdate: function () {
//        Ext.Msg.confirm('Application Update', 'This application has an update, reload?',
//            function (choice) {
//                if (choice === 'yes') {
//                    window.location.reload();
//                }
//            }
//        );
//    }
});
